package service

import (
	"context"
)

func (s *Service) UpdateCrowdFundingThali(ctx context.Context, ID int64, upadtes map[string]interface{}) error {
	if err := s.dao.UpdateCrowdFundingThali(ctx, ID, upadtes); err != nil {
		return err
	}
	return nil
}

func (s *Service) LockStockAddOne(ctx context.Context, ProductId, ProductSkuId, CrowdFundingId, CrowdFundingThaliId int64, num int64) error {
	if err := s.dao.LockStockAddOne(ctx, ProductId, ProductSkuId, CrowdFundingId, CrowdFundingThaliId, num); err != nil {
		return err
	}
	return nil
}

func (s *Service) LockStockReduceOne(ctx context.Context, ProductId, ProductSkuId, CrowdFundingId, CrowdFundingThaliId int64, num int64) error {
	if err := s.dao.LockStockReduceOne(ctx, ProductId, ProductSkuId, CrowdFundingId, CrowdFundingThaliId, num); err != nil {
		return err
	}
	return nil
}
